using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TicTacToe.GC;
using TicTacToe.GamePlay;

namespace TicTacToe.GS
{
    public class GSTeamInfo : GameStateFactory<GSTeamInfo>, IGameState
    {
        private GameControl btnBack = new GameControl("Back", GameCoordinate.X_CENTER_480 - 59, GameCoordinate.Y_BOTTOM - 70);

        public GSTeamInfo()
        {
            btnBack.OnPressedEvent += new OnPressedHandler(btnBack_OnPressedEvent);
            btnBack.OnReleasedEvent += new OnReleasedHandler(btnBack_OnReleasedEvent);

            AddControls();
        }

        void btnBack_OnReleasedEvent(object sender)
        {
            this.GetGameMain().SetGameState(GSMainMenu.GetInstance());
        }

        void btnBack_OnPressedEvent(object sender)
        {
            btnBack.ReloadControl("Back_OnClick");
            this.ReInit();
        }

        void AddControls()
        {
            gameControls.Add(btnBack);
        }
    }
}
